<template>
    <div>
        <div class="crumbs">
            <el-breadcrumb separator="/">
                <el-breadcrumb-item>
                    <i class="el-icon-lx-cascades"></i> 基础表格
                </el-breadcrumb-item>
            </el-breadcrumb>
        </div>
        <div class="container">

            <el-table
                :data="leaveempData"
                border
                class="table"
                ref="multipleTable"
                header-cell-class-name="table-header"
                :@selection-change="handleSelectionChange"
            >
                <el-table-column type="selection" width="55" align="center"></el-table-column>
                <el-table-column prop="lename" label="员工名"></el-table-column>
                <el-table-column prop="leid" label="员工编号"></el-table-column>
                <el-table-column prop="ledepartment" label="部门名称"></el-table-column>
                <el-table-column prop="lepost" label="岗位名称"></el-table-column>
                <el-table-column prop="leleavedate" label="离职时间"></el-table-column>
                <el-table-column prop="lereason" label="离职原因"></el-table-column>
                <el-table-column label="其它" width="180" align="center">
                    <template >
                    </template>
                </el-table-column>
            </el-table>
        </div>
    </div>
</template>

<script>
import { fetchleaveempData } from '../../api/index';
export default {
    name: 'basetable',
    data() {
        return {
            query: {
                address: '',
                name: '',
                pageIndex: 1,
                pageSize: 10
            },
            leaveempData:[],
            multipleSelection:[],
            delList: [],
            editVisible: false,
            pageTotal: 0,
            form: {},
            idx: -1,
            id: -1
        };
    },
    created() {
        this.getleaveempData();
    },
    methods: {
        getleaveempData() {
            fetchleaveempData(this.query).then(res => {
                console.log(res);
                this.leaveempData = res.data.value;
                this.pageTotal = res.pageTotal || 50;
            });
        },
    }
};
</script>

<style scoped>
.handle-box {
    margin-bottom: 20px;
}

.handle-select {
    width: 120px;
}

.handle-input {
    width: 300px;
    display: inline-block;
}
.table {
    width: 100%;
    font-size: 14px;
}
.red {
    color: #ff0000;
}
.mr10 {
    margin-right: 10px;
}
.table-td-thumb {
    display: block;
    margin: auto;
    width: 40px;
    height: 40px;
}
</style>
